<template>
	<view class="">

		<view class="cu-form-group">
			<view class="title">搜索:</view>
			<input placeholder="请输入手机号" @input="onKeyInput" name="input"></input>
			<button class='cu-btn bg-green shadow' @click="biu">BIU</button>
		</view>
		
		<view class="cu-list menu"   v-if="play">
		<view class="cu-item" >
			<view class="content">
				<text class="icon-locationfill text-green"></text>
					<text class="text-grey">城市</text>
				</view>
				<view class="action">
					<text class="text-grey text-sm">{{mobile.province}}.{{mobile.city}}</text>
				</view>
		</view>
		
		<view class="cu-item" >
			<view class="content">
				<text class="icon-squarecheck text-green"></text>
					<text class="text-grey">运营商</text>
				</view>
				<view class="action">
					<text class="text-grey text-sm">{{mobile.company}}.{{mobile.cardtype}}</text>
				</view>
		</view>	
							
		</view>
		
	</view>


</template>

<script>

	export default {
		data() {
			return {
				inputValue: '',
				mobile:{}, 
				play: false,
				changeValue: ''
			}
		},
		methods: {
			onKeyInput: function(event) {
				this.keyword = event.target.value
			},
			
			biu: function() {	
			console.log(this.keyword);
			uni.request({
			url: 'https://api.xuejss.com/xue/?s=jk.mobile&shouji='+this.keyword,
			method: 'GET',
				success: res => {
					console.log(res);
					this.mobile= res.data.data;
					console.log(res);	
					 this.play = true; //取反
			        uni.hideLoading(this.userList);
				},
				complete: res => {
					uni.hideLoading();
					uni.stopPullDownRefresh();
				}
			});				
	
			},
		}
	}
</script>

<style>
	.cu-form-group {
		border-bottom: 1px solid #eccff1;
	}
</style>
